package chap1_strategy.duck2;

import chap1_strategy.duck2.children.MallardDuck;
import chap1_strategy.duck2.children.ModelDuck;

public class SimuDuck {

    public static void main(String[] args) {
        new SimuDuck().test();
    }
    
    public void test() {
        testDuck(new MallardDuck());
        Duck modelDuck = new ModelDuck();
        modelDuck.display();
        modelDuck.performFly();
        modelDuck.setFlyBehavior(new FlyRocketPowered());
        modelDuck.performFly();
        //testDuck(new ModelDuck());
//        testDuck(new RedheadDuck());
//        testDuck(new RubberDuck());
//        testDuck(new DecoyDuck());
    }

    public void testDuck(Duck duck) {
        duck.display();
        duck.swim();
        duck.performQuack();
        duck.performFly();
    }
}
